// pages/help1/help1.js
Page({
  data: {
    helpcon:[
      {
        name: '公司及产品介绍'
      },
      {
        name: '新人赚钱需知'
      },
      {
        name: '常见问题'
      }
    ],
    current: 0,
    weixin: 'jdxms212',
  },
  onLoad: function (options) {
    console.log(options)
    this.setData({
      current: options.tab,
    })
  },
  navChange(e) {
    console.log(e)
    this.setData({
      current: e.currentTarget.dataset.index,
    })
  },
  wxassistant(){
    const that = this
    wx.showModal({
      title: '提示',
      content: '您的专属辅导微信号:\r\n' + this.data.weixin + '\r\n关于省钱赚钱的问题,请复制微信号去微信添加好友咨询\r\n添加时请备注:京多多会员',
      confirmText: '复制',
      confirmColor: '#2365b7',
      success(res) {
        if (res.confirm) {
          console.log('用户点击确定')
          wx.setClipboardData({
            data: that.data.weixin,
            success(res) {
              wx.getClipboardData({
                success(res) {
                  console.log(res.data) // data
                }
              })
            }
          })
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })
  }
})